#ifndef _SYS_TIM_H__
#define _SYS_TIM_H__

#include "config.h"
#include "STC32G_Timer.h"
#include "STC32G_NVIC.h"

void Timer_config(void);

u32 GetTick(void);      /* _define in STC32G_Timer_Isr.c */

#define TIMER_CALC(Tpwm)    (65536UL - (Tpwm / 100 * (MAIN_Fosc / 1000000UL)) / 10) 

#endif /* _SYS_TIM_H__ */
